<div style="padding-top:10px; padding-left:20px;">
	<?php
		if (!$listid)
		{
			$to = 'index.php?cmd=login';
			header('Location: '. $to);
		}

		$receiverid = $_GET['receiverid'];

		$con = mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database");
		mysql_select_db("$DBName", $con);
		$result = mysql_query("select * FROM $TReceivers WHERE ReceiverId='$receiverid'");
		$row = mysql_fetch_array($result, MYSQL_ASSOC);

		$fullname	= $row['FullName'];
		$shortname	= $row['ShortName'];
		$cellphone	= $row['CellPhone'];
		$phone		= $row['Phone'];
		$email		= $row['Email'];
		$birthday	= $row['BirthDay'];

		if ($birthday == "0000-00-00")
		{
			$birthday = "";
		}

		mysql_close($con);
	?>

	<form action="<?php print "receiverupdate.php?listid=$listid&phone=$fromphone" ?>" method="post">
		<fieldset>
			<legend>Opdater navn</legend>
			<br>
			<input type="hidden" name="receiverid" value="<?php print $receiverid ?>" readonly="readonly"/>
			<input type="hidden" name="listid" value="<?php print $listid ?>" readonly="readonly"/><br>
			<label for="fullname">Navn:</label>
			<input type="text" name="fullname" value="<?php print $fullname ?>"/><br>
			<label for="shortname">Fornavn:</label>
			<input type="text" name="shortname" value="<?php print $shortname ?>"/><br>
			<label for="cellphone">Mobil:</label>
			<input type="text" name="cellphone" value="<?php print $cellphone ?>"/><br>
			<label for="phone">Telefon:</label>
			<input type="text" name="phone" value="<?php print $phone ?>"/><br>
			<label for="email">Email:</label>
			<input type="text" name="email" value="<?php print $email ?>"/><br>
			<label for="birthday">Fødselsdag:<br>(YYYY-MM-DD)</label>
			<input type="text" name="birthday" value="<?php print $birthday ?>"/><br>
			<br>
			<label for="ok">.</label>
			<input type="submit" name="ok" value="Ok"/>
		</fieldset>
	</form>
</div>